package com.johnny.fourlevellinkage;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    private TextView mTvBig;
    private TextView mTvYa;
    private TextView mTvCiya;
    private TextView mTvXi;
    private Button mBtClick;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
        initView();

    }

    private void initView() {
        mTvBig = (TextView) findViewById(R.id.tv_big);
        mTvYa = (TextView) findViewById(R.id.tv_ya);
        mTvCiya = (TextView) findViewById(R.id.tv_ciya);
        mTvXi = (TextView) findViewById(R.id.tv_xi);
        mBtClick = (Button) findViewById(R.id.bt_click);

        mBtClick.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.bt_click:
                chooseFood();
                break;
        }
    }

    private void chooseFood() {
        chooseAddressUtils addressUtils = new chooseAddressUtils();
        addressUtils.creatDialog(MainActivity.this,mTvBig,mTvYa,mTvCiya,mTvXi);
    }
}
